﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="qlproductlang.ascx.cs" Inherits="admin_qlproductlang" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Label ID="info" runat="server" Text=""></asp:Label>
<center>
<table width="100%">
    <tr>
        <td>Ngôn ngữ: </td>
        <td>
            <asp:DropDownList ID="lang" runat="server" 
                DataSourceID="SqlDataSource2" DataTextField="lang" DataValueField="id" AutoPostBack="True">
            </asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConnectionString="<%$ ConnectionStrings:canhbuomxanhconnectionstring %>" 
                SelectCommand="SELECT * FROM [Languages]"></asp:SqlDataSource>
            </td>
    </tr>
    <tr>
        <td>Menu: </td>
        <td>
            <asp:TextBox ID="menu" runat="server" Width="260px"></asp:TextBox></td>
    </tr>
    <tr>
        <td>Tiêu đề: </td>
        <td>
            <asp:TextBox ID="title" runat="server" Width="260px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>Địa chỉ: </td>
        <td>
            <asp:TextBox ID="add" runat="server" Width="260px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>Nhà đầu tư: </td>
        <td>
            <asp:TextBox ID="invest" runat="server" Width="260px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>Kiến trúc sư: </td>
        <td>
            <asp:TextBox ID="archi" runat="server" Width="260px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td colspan="2"><center>
            <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Trở về" />
&nbsp;&nbsp;&nbsp; <asp:Button runat="server" ID="addbt" Text="Thêm" 
                onclick="addbt_Click"/></center></td>
    </tr>
</table>
</center>
<br />
 <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" AllowSorting="True"
        CellPadding="4" ForeColor="#333333" GridLines="None"
        PageSize="5" Width="100%" onrowcreated="GridView1_RowCreated" 
        onrowediting="GridView1_RowEditing" 
    DataSourceID="SqlDataSource1" DataKeyNames="id,lang" 
    EnableModelValidation="True" onrowdeleting="GridView1_RowDeleting">
        <RowStyle BackColor="#EFF3FB" VerticalAlign="Middle" />
        <EmptyDataRowStyle VerticalAlign="Middle" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="White" ForeColor="#459300" HorizontalAlign="Center" />
        <EmptyDataTemplate>
             <asp:Label ID="Label3" runat="server" Text="Chưa có dữ liệu"></asp:Label>
        </EmptyDataTemplate>
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#57A000" Font-Bold="True" ForeColor="White" />
        <Columns>
            <asp:TemplateField HeaderText="id" SortExpression="id" Visible="False" ItemStyle-HorizontalAlign="Center">
                <EditItemTemplate>
                    <asp:Label ID="id" runat="server" Text='<%# Eval("id") %>'></asp:Label>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="id" runat="server" Text='<%# Bind("id") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Ngôn ngữ" SortExpression="lang">
                <EditItemTemplate>
                    <asp:Label ID="lg" runat="server" Text='<%# Eval("lang") %>'></asp:Label>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lg" runat="server" Text='<%# Bind("lang") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:BoundField DataField="menu" HeaderText="Menu" 
                SortExpression="menu" ItemStyle-HorizontalAlign="Center">
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="title" HeaderText="Tiêu đề" 
                SortExpression="title" ItemStyle-HorizontalAlign="Center" >
<ItemStyle HorizontalAlign="Center"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="address" HeaderText="Địa chỉ" 
                SortExpression="address" ItemStyle-HorizontalAlign="Center" >
<ItemStyle HorizontalAlign="Center"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="investor" HeaderText="Nhà đầu tư" 
                SortExpression="investor" ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="architector" HeaderText="Kiến trúc sư" 
                SortExpression="architector" ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
            </asp:BoundField>
            <asp:CommandField ButtonType="Button" EditText="Sửa" ShowEditButton="True" 
                ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
            </asp:CommandField>
            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:Button ID="Button1" runat="server" CausesValidation="true" 
                        CommandName="Delete" Text="Xoá" OnClientClick="return confirm('Bạn thật sự muốn xóa dữ liệu này?')" />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#003366" VerticalAlign="Middle" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:canhbuomxanhconnectionstring %>" 
    SelectCommand="SELECT * FROM [Product_lang] WHERE ([id] = @id)">
    <SelectParameters>
        <asp:QueryStringParameter Name="id" QueryStringField="id" 
            Type="Int64" />
    </SelectParameters>
</asp:SqlDataSource>